package es.udima.geo.geoserver.rest.entities;

import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

class RestServiceResponse {

    private Set<IResponseError> responseErrors;

    public RestServiceResponse() {
	responseErrors = new HashSet<IResponseError>();
    }

    public boolean isResponseSuccessful() {
	return responseErrors.isEmpty();
    }

    public Collection<IResponseError> getResponseErrors() {
	return responseErrors;
    }

    public void addResponseError(IResponseError responseError) {
	this.responseErrors.add(responseError);
    }
    
    public void addResponseErrors(Collection<IResponseError> responseErrors) {
	this.responseErrors.addAll(responseErrors);
    }
}
